//
//  CollectionCellModel.m
//  Cook
//
//  Created by Macbookpro on 15/4/15.
//  Copyright (c) 2015年 dingjun. All rights reserved.
//

#import "CollectionCellModel.h"

#define lableHight 30
@implementation CollectionCellModel

- (void)dealloc
{
    [_label release];
    [_imageView release];
    
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height - lableHight)];
//        self.imageView.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_imageView];
//        self.imageView.layer.cornerRadius = _imageView.frame.size.width / 2;
        self.imageView.layer.masksToBounds = YES;
        [_imageView release];
        
        self.label = [[UILabel alloc] initWithFrame:CGRectMake(_imageView.frame.origin.x, _imageView.frame.origin.y + _imageView.frame.size.height, _imageView.frame.size.width, lableHight)];
        self.label.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:_label];
        [_label release];
        
        
        
    }
    return self;
}

@end
